﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddPeriodo.aspx.cs" Inherits="NewTierra.Pages.AddPeriodo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.8.3.js" type="text/javascript"></script>
  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js" type="text/javascript"></script>

    <link href="../../Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

       <script language="javascript" type="text/javascript">

           jQuery(function ($) {
               $.datepicker.regional['pt-BR'] = {
                   closeText: 'Fechar',
                   prevText: '&#x3c;Anterior',
                   nextText: 'Pr&oacute;ximo&#x3e;',
                   currentText: 'Hoje',
                   monthNames: ['Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio', 'Junho',
                'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
                   monthNamesShort: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
                'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
                   dayNames: ['Domingo', 'Segunda-feira', 'Ter&ccedil;a-feira', 'Quarta-feira', 'Quinta-feira', 'Sexta-feira', 'Sabado'],
                   dayNamesShort: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                   dayNamesMin: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab'],
                   weekHeader: 'Sm',
                   dateFormat: 'dd/mm/yy',
                   firstDay: 0,
                   isRTL: false,
                   showMonthAfterYear: false,
                   yearSuffix: ''
               };
               $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
           });

           $(function () {
               $("#from").datepicker({
                   defaultDate: "+1w",
                   changeMonth: true,
                   numberOfMonths: 1,
                   onClose: function (selectedDate) {
                       $("#to").datepicker("option", "minDate", selectedDate);
                   }
               });
               $("#to").datepicker({
                   defaultDate: "+1w",
                   changeMonth: true,
                   numberOfMonths: 1,
                   onClose: function (selectedDate) {
                       $("#from").datepicker("option", "maxDate", selectedDate);
                   }
               });
               $.datepicker.formatDate('yyyy-mm-dd');
           });

           function Teste() {
               alert("Foi");
           }

    </script>

    <title></title>
    <style type="text/css">
        #body   
       {
         background-color:White;
         font-size: .80em;
         font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
         width: 408px;
         height: 334px;
            margin-bottom: 0px;
        }
        #form1
        {
            width: 404px;
            height: 335px;
            margin-bottom: 0px;
        }
        #AddPeriodo
        {
            width: 388px;
            height: 326px;
            padding: 10px;
        }
        #AddPeriodo .esq
        {
            height: 207px;
            float: left;
            width: 221px;
        }
        #AddPeriodo .dir
        {
            height: 193px;
            float: left;
            width: 157px;
        }
        #AddPeriodo .Botoes
        {
            height: 84px;
            width: 378px;
            float: left;
        }
    </style>
</head>
<body id="body">
     <form id="form1" runat="server">

    <div id="AddPeriodo">

    <fieldset style="width: 388px">
        <legend>Cadastrar Períodos</legend>
   

      <div class="esq">
  
                <asp:Label ID="lblFrom" runat="server" Text="Data From:"></asp:Label> <br />
                <asp:TextBox ID="from" runat="server" Width="100px" MaxLength="10" onkeypress="teste()"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="from" ErrorMessage="*" 
                    Font-Size="Small" ToolTip="Campo requerido." ValidationGroup="Salvar">*</asp:RequiredFieldValidator>
                <br />

               <asp:Label ID="lblTo" runat="server" Text="Data To:"></asp:Label><br />
               <asp:TextBox ID="to" runat="server" Width="100px" MaxLength="10"></asp:TextBox>
               <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="to" ErrorMessage="*" Font-Size="Small" 
                    ToolTip="Campo requerido." ValidationGroup="Salvar">*</asp:RequiredFieldValidator>
               <br />

                <asp:Label ID="lblEstacao" runat="server" Text="Estação/Pacote:"></asp:Label><br />
                <asp:DropDownList ID="DropEstacao" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropEstacao_SelectedIndexChanged">
                </asp:DropDownList>
                <br />
                
                <asp:Panel ID="PanelNomePacote" runat="server" Visible="false">
                  <asp:TextBox ID="txtNomePacote" runat="server" placeholder="Nome do pacote" TextMode="MultiLine" Height="30px" Width="200px" MaxLength="100" />
                  <br />
                </asp:Panel>

                <asp:Label ID="lblMercado" runat="server" Text="Mercado:"></asp:Label><br />
                <asp:DropDownList ID="DropMercado" runat="server">
                </asp:DropDownList>
                <br />

        </div>

        <div class="dir">
                <asp:Label ID="lblBaseTarifariaTXT" runat="server" Text="Base Tarifária:"></asp:Label><br />
                <asp:DropDownList ID="DropBaseTarifaria" runat="server">
                </asp:DropDownList>
                <br />

                <asp:Label ID="lblMoeda" runat="server" Text="Moeda:"></asp:Label><br />
                <asp:DropDownList ID="DropMoeda" runat="server">
                </asp:DropDownList>
                <br />

                <asp:Label ID="lblMinimodeNoites" runat="server" Text="Mínimo de Noites:"></asp:Label><br />
                <asp:DropDownList ID="DropQtdNoites" runat="server">
                </asp:DropDownList>
                <br />

                <asp:Label ID="lblPromocaoTXT" runat="server" Text="Promoção:"></asp:Label><br />
                <asp:DropDownList ID="DropPromocao" runat="server">
                </asp:DropDownList>
                <br />

                <br />
        </div>

        <div class="Botoes">
                        <asp:Label ID="lblSupplierMostrar" runat="server" Text="Supplier:"></asp:Label>
                &nbsp<asp:Label ID="lblSupplier" runat="server" Font-Size="Small" Text="Supplier"></asp:Label>
                <br /><br />

        <asp:Button ID="btnSalvarPeriodo" CssClass="btnsGeral" runat="server" Text="Salvar" ValidationGroup="Salvar"  OnClick="CadastrarPeriodo" />
        <asp:Button ID="btnAtualizarPeriodo" CssClass="btnsGeral" runat="server" Text="Atualizar" ValidationGroup="Salvar"  
                            OnClick="AtualizarPeriodo" Visible="false" />
                &nbsp;<asp:Button ID="btnFechar" CssClass="btnsGeral" runat="server" OnClientClick="window.close();" Text="Fechar"/>
                <br />
           
         <asp:Label ID="lblMsgAddPeriodo" runat="server" Font-Bold="True" ForeColor="#CC0000"></asp:Label>
        </div>
                
        
            </fieldset>

    </div>
    
    </form>
</body>
</html>
